<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Nguyen Hung
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <!-- -->
        <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
        <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
        <!-- -->
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.rateit.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/rateit.css">
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){ 
                var sums=0;
                a=0;b=0;
                $j(".ph").live("keyup",function(){
                    a = $j(".ph").val();
                    b = $j(".sl").val();
               
                    sums =parseFloat(a)+parseFloat(b);
                    $j(".sum").text(sums);
                });
                $j(".sl").live("keyup",function(){
                    a = $j(".ph").val();
                    b = $j(".sl").val();
                    sums =parseFloat(a)+parseFloat(b);
                    $j(".sum").text(sums);
                });
                
               
                var i = 0;
                $j(".btn_add_tour").live("click",function(){   
                    if(v7==0){
                        alert("Ban khong duoc copy vi chua tao noi dung")   ;
                    }else{
                        $j(".content_tour").clone(this).appendTo(".around_tour");                  
                    }
               
                });
                
        
                var v2 = 0;
                var v3 = 0;
                var v5 = 0;
                var v6=0;
                var v7 = 0;
                var i = 0;
                $j(".tour_row6").live("click",function(){
                    alert($j("form#demo").serialize());
                    v1 = $j("#service").val();
                    v2 =$j(".ph").val();
                    v3 = $j(".sl").val();
                    v4 = $j("#money").val();
                    v5 = parseFloat(v2)+parseFloat(v3);
                    v6 =parseFloat(v5)+parseFloat(v6);
                    v7  = $j(".v6").text(v6.toString());                  
                    i++;
                  
                    template_row2='';
                    template_row2+='        <div class="tour_bottom_content" id="'+i+'">';
                    template_row2+='            <div class="tour_row1">';
                    template_row2+='                <h:outputText value="'+v1+'"  />';
                    template_row2+='            </div>';                    
                    template_row2+='            <div class="tour_row2" >';
                    template_row2+='               <h:outputText value="'+v2+'" style="text-align:right;" />';
                    template_row2+='            </div>';
                    
                    template_row2+='            <div class="tour_row3">';    
                    template_row2+='               <h:outputText value="'+v4+'" />';
                    template_row2+='            </div>';
                    
                    template_row2+='            <div class="tour_row4">';
                    template_row2+='               <h:outputText value="'+v3+'" style="text-align:right;"/>';
                    template_row2+='            </div>';
                    
                    template_row2+='            <div class="tour_row5">';
                    template_row2+='               <h:outputText value="'+v5+'" styleClass="v5" style="text-align:right;" />';
                    template_row2+='            </div>';
                    
                    template_row2+='            <div class="tour_row7 tour_row7[]" id="">';
                    template_row2+='               <img src="../images/list_remove.png" alt=""/>';
                    template_row2+='            </div>';  
                   
                    
                    
                    
                   
                    template_row2+='        </div>';
                    $j(".tour_bottom_content_parent").append(template_row2);
                    
               
              
                });
                $j(".tour_row7").live("click",function(){
                   var content_show = $j(".tour_bottom_content").attr("id");               
                  $j("#"+content_show).remove();
                });
               
            });
             
                
        </script>
        <style>
            div.chare_content{
                float:left;
                width:98%;
                height: auto;

            }
            .chare_content .chare_content_head{
                background:#586C7F; 
                float:left;
                height: 12px;
                padding:8px;
                width:100%;

            }
            .chare_content .chare_content_head span{
                font-size: 12px;
                color:#fff;
                font-weight: bold;

                text-transform: uppercase;
            }
        </style>

    </head>


    <body>
        <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
        <div id="content">
            <div id="menu_top">
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Khu vực</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>

                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Outlets</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>
                            <li><a href="#"><span>Ban Điều Hành</span></a></li>
                            <li><a href="#"><span>Nhóm IT</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="content_detail">
                <div class="sidebar">
                    <a href="customerInput.jsp?action=addEmp&table=A&height=300px&width=400px" class="fancybox add_new" id="fancybox">
                        <span><h:outputText value="#{locale.addCustomer}"/>
                        </span>
                    </a>

                    <div class="search_box">
                        <form action="" method="get">
                            <h3><h:outputText value="#{locale.search}"/></h3>
                            <div class="fields_input">
                                <input name="" type="text"  value="Tìm theo từ khoá..." onblur="if(this.value=='')this.value='Tìm theo từ khoá...';" onfocus="if(this.value=='Tìm theo từ khoá...')this.value='';" />
                                <input name="" type="submit" value="OK" />
                            </div>
                        </form>
                        <h4><h:outputText value="#{locale.advance_search}"/></h4>
                        <div class="fields_select">
                            <select name="">
                                <option><h:outputText value="#{locale.group}"/> / <h:outputText value="#{locale.Departments}"/></option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option>Giới tính...</option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option>Chức vụ...</option>
                            </select>
                        </div>
                        <div class="fields_select">
                            <select name="">
                                <option>Thu nhập...</option>
                            </select>
                        </div>
                        <div class="fields_submit">
                            <input name="" type="submit" value="Tìm chọn" />
                        </div>
                    </div>
                </div>
                <div class="content_right">
                    <div class="fillter">
                        <h:form>
                            <div class="dropdown">
                                <div class="select_choise">
                                    <h:outputLink value="workChargeCM.jsp"><span><h:outputText value="#{locale.individuals}"/></span>
                                        <f:param value="customer.jsp" name="page"></f:param>
                                    </h:outputLink>
                                </div>
                                <div class="select_hidden">
                                    <ul>
                                        <li> <h:outputLink value="workChargeCOM.jsp"><span><h:outputText value="#{locale.company}"/></span>
                                                <f:param value="cuscompany.jsp" name="page"></f:param>
                                            </h:outputLink>
                                        </li>

                                    </ul>
                                </div>
                            </div>
                        </h:form>
                    </div>
                    <a4j:form id="demo">
                        <div class="content">

                            <!-- Strart list Content -->
                            <div class="list_content">
                                <div class="chare_content">
                                    <div class="chare_content_head"><span>Quản lý Tour</span></div>
                                </div>
                                <div class="around_tour">
                                    <div class="btn_add_tour"><img src="../images/list_add.png" alt=""/></div>
                                    <!-- start content tour-->
                                    <div class="code_tour">
                                        <label style="margin-left:4px;">Tour:</label>
                                        <h:selectOneMenu value="">                                           
                                            <f:selectItem itemLabel="Ha Noi - Hue" itemValue="1" />
                                            <f:selectItem itemLabel="ABC" itemValue="2" />
                                            <f:selectItem itemLabel="ABC" itemValue="3" />
                                        </h:selectOneMenu>
                                    </div>
                                    <div class="content_tour">
                                        <div class="content_tour_top">
                                            <div class="content_tour_top_left">
                                                <div class="tour_input_feild">
                                                    <label>Số lượng:</label>
                                                    <h:inputText value="" style="width:50px !important;"/>
                                                </div>
                                                <div class="tour_input_feild">
                                                    <label>HDV:</label>
                                                    <h:inputText value="" style="width:50px !important;"/>
                                                </div>
                                            </div>
                                            <div class="tour_right" style="float:right;"><img src="../images/list_remove.png" alt=""/></div>
                                        </div>
                                        <div class="content_tour_bottom">
                                            <div class="content_tour_bottom_parent_content_ssum">
                                                <div class="tour_bottom_content_parent">
                                                    <div class="tour_bottom_head">
                                                        <div class="tour_row1">Han muc</div>
                                                        <div class="tour_row2">Phí</div>
                                                        <div class="tour_row3">Ngoai te</div>
                                                        <div class="tour_row4">So luong</div>
                                                        <div class="tour_row5">Tong</div>
                                                        <div class="tour_row6"></div>
                                                    </div>
                                                </div>
                                                <div class="tour_bottom_content">
                                                    <div class="tour_row1">   
                                                        <select id="service" >
                                                            <option value="volvo">Volvo</option>
                                                            <option value="saab">Saab</option>
                                                        </select>
                                                    </div>
                                                    <div class="tour_row2" >
                                                        <h:inputText value="" styleClass="ph" />
                                                    </div>
                                                    <div class="tour_row3">    
                                                        <select id="money">
                                                            <option value="USD">USD</option>
                                                            <option value="VND">VND</option>
                                                        </select>
                                                    </div>
                                                    <div class="tour_row4">
                                                        <h:inputText value="" styleClass="sl"/>
                                                    </div>

                                                    <div class="tour_row5">
                                                        <h:outputText value="" styleClass="sum"/>
                                                    </div>
                                                    <div class="tour_row6">
                                                        <img src="../images/list_add.png" alt=""/>
                                                    </div> 
                                                </div>

                                                <div class="tour_bottom_content_sum">
                                                    <label>Tổng:</label>&nbsp;&nbsp;<span style="color: #0E81ED; float: left; text-align: right; width: 95px;"><h:outputText value="0" styleClass="v6" /></span><span style="float: right; margin-left: -4px;position: absolute;"> VND</span>
                                                </div>
                                            </div>
                                            <div class="tour_bottom_content_business_speci">
                                                <div class="tour_bottom_content_business">
                                                    <div class="tour_bottom_content_business_head">
                                                        <label>Kinh Doanh:</label>&nbsp;&nbsp;<span style="color:#0E81ED;">98745</span>
                                                    </div>
                                                    <div class="tour_bottom_content_business_bottom">
                                                        <label>Lãi xuất:</label>&nbsp;&nbsp;<span style="color:#0E81ED;float:left;width:150px;">98745</span>
                                                        <label>Tỉ lệ:</label>&nbsp;&nbsp;<span style="color:#0E81ED;float:left;width:150px;">28 %</span>
                                                        <label>Profit:</label>&nbsp;&nbsp;<span style="color:#0E81ED;float:left;width:150px;">27</span>
                                                    </div>
                                                </div>
                                                <div class="tour_bottom_content_specific">
                                                    <label>Dự thu:</label>&nbsp;&nbsp;<span style="color:#0E81ED;">98745</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- e nd content tour-->

                                </div>

                            </div>
                            <!-- End List Content-->    
                        </div>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="Please wait" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>
                    </a4j:form>
                </div>
            </div>
        </div>

    </body>
</html>
